# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-bayeso
pkgver=0.5.5
pkgrel=0
pkgdesc="A Bayesian optimization framework"
url="https://bayeso.org"
arch="noarch"
license="MIT"
depends="python3 py3-cma py3-numpy py3-scipy py3-tqdm"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-xdist py3-pytest-benchmark"
subpackages="$pkgname-pyc"
source="https://github.com/jungtaekkim/bayeso/archive/v$pkgver/bayeso-$pkgver.tar.gz"
builddir="$srcdir/bayeso-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto --ignore=tests/integration_test.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
fc3818e3b95a5740686edd62e049b49b23d28cbcdc21963fb71432e106c6c7a5b5ca9e85d5dfc894ea188ed99fca99ab9f65a51bde9e4ec66179b36bd6b43970  bayeso-0.5.5.tar.gz
"
